POV-Ray : Newsgroups : povray.beta-test : PNG output much brighter than preview... : Re: PNG output much brighter than preview... Server Time
29 Apr 2024 05:37:43 EDT (-0400)
  Re: PNG output much brighter than preview...  
From: Warp
Date: 15 Jan 2007 15:56:32
Message: <45abea7f@news.povray.org>
Daniel Nilsson <pov### [at] daniel-nilssoncom> wrote:
> If you create an image in windows (gamma 2.2) and save it as JPEG and 
> PNG and send whose to your friend who owns a mac (gamma 1.8) the JPEG 
> will look wrong while the PNG will look exactly as you intended (thanks 
> to the stored gamma info). This assumes that both systems use programs 
> that use gamma information as they should and that both system are 
> configured correctly.

  I know the theory. The problem is that in practice gamma correction
only causes more problems than it's worth.

  There's only one thing for which PNG is criticized by the industry
as a whole, and it's related to... surprise surprise, gamma correction.

  Gamma correction in PNG causes lots of problems. For instance, if
you want to make a web page with a certain backtround color and add
a PNG image which uses that exact same color, you can blame gamma
correction for the fact that often you won't. While you can do that
with any other image format, and the image will match the background
color in the web page perfect, with PNG it often won't. It depends on
the browser. Some browsers read the gamma correction, others don't.
If there's no gamma correction, some browsers will guess a gamma
correction (screwing up the colors) while others will take the pixels
unmodified.
  Other image formats simply don't have these problems. If you use
a certain color in a gif or jpg or whatever, you will get that certain
color, and it will perfectly match the same color used in the background
of the web page. With png you might or might not get the color you want.
In one browser it may look good, in another it may not.

  The PNG standardization organization screwed up. They gave unwise
rules on what to do when a png file has no gamma information. Some
programs follow this rule, others don't. What is worse, if there *is*
gamma info, some programs will read it, others won't. Thus you might
get even 4 different results depending on the gamma info and the
program.

  In my personal experience the least problematic course of action is
to not to include any gamma info in the png file. While that will not
guarantee anything (some programs may start "guessing" a gamma info
for it even if you don't want it to), I think most programs will then
just take the pixels as they are, in the same way is with any other
image format.

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.